export const systemInfo = {
  data: () => ({
    statusBarHeight: 0,
    navigationBarHeight: 0,
    navHeight: 0,
    windowHeight: 0,
	bottomHeight: 0,
	showTitle: true,
	// themes
	mainColor:'#FFCE00',
	textColor:'#333333',
	bgColor:'#FAFAF5',
	hintColor:'#999999',
  }),
  onShow() {
	  if (getApp().globalData.toast) {
		  uni.showToast({
		  	icon: 'none',
			title: getApp().globalData.toast
		  });
		  getApp().globalData.toast = undefined;
	  }
  },
  methods: {
    getSystemInfo() {
      this.statusBarHeight = getApp().globalData.statusBarHeight
      this.navigationBarHeight = getApp().globalData.navigationBarHeight
      this.windowHeight = uni.getSystemInfoSync().windowHeight
      this.navHeight = getApp().globalData.navHeight
	  this.bottomHeight = getApp().globalData.bottomHeight
	  this.platform = getApp().globalData.platform
	  this.version = getApp().globalData.version
	  this.showTitle = getApp().globalData.showTitle
	  
    },
	setToast(msg) {
		getApp().globalData.toast = msg;
	}
  },
}